package com.skywork.controller.exception;

import org.springframework.http.HttpStatus;


/**
 * 专用于Restful Service的异常.
 * 
 * @author junchao
 */
public class RestException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
	
	private String code;
	
	
	public RestException() {
	}

	public RestException(HttpStatus status) {
		this.status = status;
	}


	public RestException(HttpStatus status, String message) {
		super(message);
		this.status = status;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
